package com.df.account;

import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig;
import com.df.base.other.SpringContextHelper;
import com.df.base.updater.annotation.EnableGroovyUpdate;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Import;

import java.util.concurrent.CountDownLatch;

/**
 * 游戏角色唯一id 一致性哈希或分布式哈希表(DHT)
 */
@SpringBootApplication
@EnableNacosConfig
@EnableDubbo
@EnableGroovyUpdate(
        interval = 30000,
        localScriptPath = {"D:\\MyProject\\bakend\\java\\Game-Demo\\Services\\Account\\src\\main\\scripts"},
        cachePath = "./groovy-scripts-cache"
)
public class AccountApplication {

    public static void main(String[] args) {
        SpringApplication.run(AccountApplication.class, args);
        try {
            new CountDownLatch(1).await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
